<?php
/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2016-10-20
 * Time: 15:07
 */

namespace app\src\shoppingCart\model;


use think\Model;

class ShoppingCart extends Model
{
    const  CART_STATUS_NORMAL = "1";
    const  CART_STATUS_SHELF_OFF = "2";
    const  CART_STATUS_INVALID = "3";
    const  CART_STATUS_INVENTORY_LACK = "4";

    public static function getCartStatusDesc($status){

        switch ($status){
            case self::CART_STATUS_NORMAL:
                return lang("ok");
                break;
            case self::CART_STATUS_SHELF_OFF:
                return lang("CART_STATUS_INVALID");
                break;
            case self::CART_STATUS_INVALID:
                return lang("CART_STATUS_INVALID");
                break;
            case self::CART_STATUS_INVENTORY_LACK:
                return lang("CART_STATUS_INVENTORY_LACK");
                break;
            default:
                return lang("CART_STATUS_UNKNOWN");
                break;
        }

    }
}